<script type="text/javascript">
<!--
function handleAjax(url,statuShowArea){
	$(statuShowArea).attr('src','/i/admin/index_loading.gif');
	ajax(url,'tpl=a.tpl&id=<?php echo $a['rewrite']?>',function(){
		$(statuShowArea).attr('src','/i/admin/index_loaded.gif');
	},function(){
		$(statuShowArea).attr('src','/i/admin/index_loadfail.gif');
	});
}

clearsmarty = function(){
	handleAjax('/opera/clearsmarty','#clearsmartystatus');
}
$(function(){
	$('input.opera').click(function(){
		if (confirm('确定'+this.value+'?'))
			if (typeof window[this.id] == 'function')
				eval(this.id+'()');
			else
				alert('函数未定义');
	});
})
//-->
</script>

<h2>修改文章</h2>
<div id="main">
	<form action="" class="jNice" method="post">
		<br />
		<fieldset>
		<p><input id="clearsmarty" type="button" value="清除该文章smarty缓存" class="opera" /><img id="clearsmartystatus" /></p>
		<p><label>文章标题:</label><input type="text" class="text-long" name="title" value="<?php echo $a['title']?>" /></p>
		<p><label>link rewrite:</label><input type="text" class="text-long" name="rewrite" value="<?php echo $a['rewrite']?>" /></p>
		<p><label>tag&nbsp;&nbsp;(标签用逗号分隔):</label><input type="text" class="text-long" name="tags" value="<?php echo $tags?>" /></p>
		<p><label>keywords:</label><input type="text" class="text-long" name="keywords" value="<?php echo $a['keywords']?>" /></p>
		<p><label>description:</label><input type="text" class="text-long" name="description" value="<?php echo $a['description']?>" /></p>
		<p><label>文章内容:</label><?php echo $xheditor?></p>
    	<input type="submit" value="保存" />
    	</fieldset>
    </form>
</div>
<div id="test"></div>